<?php
namespace app\index\controller;

use app\Lib\Api\Role\addRole;
use app\Lib\Api\Role\editRole;
use app\Lib\Api\Role\getRoleList;
use app\Lib\TopClient;

class Index
{

    public function index()
    {
//        $role = (new addRole());
//        $role->setArgs('opUid',1);
//        $role->setArgs('name','超级管理员');
//        $role->setArgs('remark','测试接口');
//        $role->setArgs('listOrder','255');
//        $role->setArgs('roleAlias','superAdministrator');
//        $role->setArgs('parentId','0');
//        $result = (new TopClient($role))->getSuccessData();
//        dump($result);




//        $role = (new editRole());
//        $role->setArgs('opUid',1);
//        $role->setArgs('name','设计总监');
//        $role->setArgs('remark','测试接口');
//        $role->setArgs('listOrder','255');
//        $role->setArgs('roleAlias','designDirector');
//        $role->setArgs('parentId','0');
//        $role->setArgs('roleId','3');
//        $result = (new TopClient($role))->getSuccessData();
//        dump($result);

        $role = new getRoleList();
        $role->setArgs('page',1); //$page
        $role->setArgs('limit',10); //$limit
        $result = (new TopClient($role))->getSuccessData();
        dump($result);
    }
}
